/**
 * kl yy-ds @2021
 */
package com.cxps.server.user.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.cxps.server.user.domain.UserEntity;
import com.cxps.server.user.domain.UserQuery;
import com.cxps.server.user.domain.UserRole;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * 用户持久层
 *
 * @author YouCai.Liu
 * @since 2021/10/8
 * ...
 */
@Mapper
public interface UserMapper extends BaseMapper<UserEntity> {

    List<UserEntity> getUserList(@Param("page") Page<UserEntity> page, @Param("query") UserQuery query);

    void delUserByIds(Map<String, Object> map);

    void addRole(List<UserRole> list);

    void delRoleByUserId(String id);

    List<String> getUserRoleIdByUserId(String id);

    List<String> getUserRoleByUserId(String id);

    List<String> getMenusByUserId(String id);
}
